#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void updateList();
    void closeEvent(QCloseEvent *event);

private slots:
    void fundShowDetail();

    void receiveAddFund(QString code, QString viewString);
    void receiveDeleteFund(QString code);

    void on_actionExit_triggered();
    void on_actionAddStockCode_triggered();

    void on_actionAddFundCode_triggered();

//    void gottenSingle(bool rslt);
    void updateViewString(QString code, QString viewString, float estimatedPersent);
    void timeroutHandle();


    void on_actionHideAll_triggered();

private:
    Ui::MainWindow *ui;
    QTimer *timer;

    void addSingleFundLine(QString code, QString viewString);
    void deleteSingleFundLine(QString code);

    void relocate();
    void resize();

protected:
    virtual void resizeEvent(QResizeEvent *event) override;

};
#endif // MAINWINDOW_H
